package com.kystar.muxplayer.model;

import android.graphics.Rect;

public class Bound {
    public int x;
    public int y;
    public int w;
    public int h;//set default value
    public Bound() {

    }

    public Bound(int x, int y, int w, int h) {
        this.x = x;//margin value
        this.y = y;
        this.w = w;
        this.h = h;
    }

    public Rect toRect() {
        return new Rect(x,y,x+w,h+y);
    }

    @Override
    public String toString() {
        return "Bound{" +
            "x=" + x +
            ", y=" + y +
            ", w=" + w +
            ", h=" + h +
            '}';
    }
}
